package com.xbongbong.pro.statistic.pojo.vo;

import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.pro.statistic.pojo.RelatedProductDefaultRelationPojo;
import com.xbongbong.pro.statistic.pojo.SlaveSourcePojo;
import com.xbongbong.pro.statistic.pojo.SpecialFieldPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * 创建时间： 2019/1/11 21:17
 * 修改时间： 2019/1/11 21:17 梁鲁江
 *
 * @author 梁鲁江
 */
@Setter
@Getter
@ToString
public class DataSourceAttrVO extends BaseVO {
    private static final long serialVersionUID = -2788445075071842901L;
    /**
     * 筛选条件，关联字段，表头字段
     */
    private List<DataSourceObjectVO> selectAble;
    /**
     * 汇总字段，值
     */
    private List<DataSourceObjectVO> summaryAble;
    /**
     * 查询表汇总字段,值
     */
    private List<DataSourceObjectVO> querySummaryAble;
    /**
     * 分组字段，分类，系列
     */
    private List<DataSourceObjectVO> groupAble;
    /**
     * 归属人
     */
    private List<DataSourceObjectVO> belongAble;
    /**
     * 时间字段
     */
    private List<DataSourceObjectVO> timeAble;
    /**
     * 展示字段 表头/穿透
     */
    private List<DataSourceObjectVO> showAble;
    /**
     * 关联字段
     */
    private List<DataSourceObjectVO> linkAble;

    /**
     * 关联数据中的关联表单
     */
    private List<SlaveSourcePojo> slaveSources;

    /**
     * 默认关系数组
     */
    private List<RelatedProductDefaultRelationPojo> defaultRelation;

    /**
     * 仪表盘需要的所有接口参数包括表头以及计数字段
     */
    private List<DataSourceObjectVO> dashboardAble;
    /**
     * 地址字段
     */
    private List<DataSourceObjectVO> addressAble;
    /**
     * 漏斗维度字段
     */
    private List<DataSourceObjectVO> funnelAble;
    /**
     * 隐藏逻辑
     */
    private List<DataSourceObjectVO> hideAble;

    /**
     * 数据预警信息
     */
    private Boolean dataWarningPermissions;

    /**
     * 当前图表是否允许钻取
     */
    private Boolean drillFlag;

    /**
     * 存储各种特殊类型字段fieldType集合
     */
    private SpecialFieldPojo specialField;

    public DataSourceAttrVO(){
        selectAble = new ArrayList<>();
        summaryAble = new ArrayList<>();
        querySummaryAble = new ArrayList<>();
        groupAble = new ArrayList<>();
        belongAble = new ArrayList<>();
        timeAble = new ArrayList<>();
        showAble = new ArrayList<>();
        linkAble = new ArrayList<>();
        slaveSources = new ArrayList<>();
        dashboardAble = new ArrayList<>();
        addressAble = new ArrayList<>();
        funnelAble = new ArrayList<>();
        hideAble = new ArrayList<>();
    }

    public  void addSelectAble(DataSourceObjectVO  dataSourceObjectVO){
        this.selectAble.add(dataSourceObjectVO);
    }
    public  void addSummaryAble(DataSourceObjectVO  dataSourceObjectVO){
        this.summaryAble.add(dataSourceObjectVO);
    }
    public  void addStatisticSummaryAble(DataSourceObjectVO dataSourceObjectVO) {this.querySummaryAble.add(dataSourceObjectVO);}
    public void addTimeAble(DataSourceObjectVO  dataSourceObjectVO){
        this.timeAble.add(dataSourceObjectVO);
    }
    public void addBelongAble(DataSourceObjectVO  dataSourceObjectVO){
        this.belongAble.add(dataSourceObjectVO);
    }
    public  void addGroupAble(DataSourceObjectVO  dataSourceObjectVO){
        this.groupAble.add(dataSourceObjectVO);
    }
    public  void addShowAble(DataSourceObjectVO  dataSourceObjectVO){
        this.showAble.add(dataSourceObjectVO);
    }
    public  void addLinkAble(DataSourceObjectVO  dataSourceObjectVO){
        this.linkAble.add(dataSourceObjectVO);
    }
    public  void addDashboardAble(DataSourceObjectVO  dataSourceObjectVO){
        this.dashboardAble.add(dataSourceObjectVO);
    }
    public  void addSlaveSources(SlaveSourcePojo  slaveSourcePojo){
        this.slaveSources.add(slaveSourcePojo);
    }
    public void addAddressAble(DataSourceObjectVO  dataSourceObjectVO){
        this.addressAble.add(dataSourceObjectVO);
    }
    public void addFunnelAble(DataSourceObjectVO  dataSourceObjectVO){this.funnelAble.add(dataSourceObjectVO);}

    public void addHideAble(DataSourceObjectVO dataSourceObjectVO) {
        this.hideAble.add(dataSourceObjectVO);
    }

}
